# class EmployeePosition < ActiveRecord::Base
#   extend EmployeePositionRepositiory
#   belongs_to :position,     class_name: '::Position'
#   belongs_to :organization, class_name: '::Organization'

#   validates :position, :uniqueness => {:scope => [:employee, :organization]}
#   validate :induction_time_than_now


#   state_machine :initial => :normal do

#   end

#   private

#   def induction_time_than_now
#     errors.add(:induction_time, "上岗时间不能大于当前时间") if induction_time > Time.now.to_date
#   end

# end


class EmployeePosition < ActiveResource::Base
  extend EmployeePositionRepositiory
  include MongoId
  self.site = Settings.server_address
  self.element_name = "user_job"


  def employee_id
    user_id
  end

end